body {
  background-color: darkslategrey;
  text-align: center;
}
.game-container {
  display: flex;
  flex-wrap: wrap;
  width: 40vw;
  height: 40vw;
  margin: 2vw auto;
  background-color: #0c1021;
  border: solid 10px slategrey;
  border-radius: 10px;

  -webkit-box-shadow: 0px 0px 20px 3px rgba(0, 0, 0, 0.6);
  -moz-box-shadow: 0px 0px 20px 3px rgba(0, 0, 0, 0.6);
  box-shadow: 0px 0px 20px 3px rgba(0, 0, 0, 0.6);
  transition: all 0.5s;
}
.game-tile {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 10vw;
  height: 10vw;
  border: 1px solid black;
  transition: all 0.5s;
  box-sizing: border-box;
}
.tile-2 {
  background-color: #eee4da;
}

.tile-4 {
  background-color: #ede0c8;
}

.tile-8 {
  background-color: #f2b179;
}

.tile-16 {
  background-color: #f59563;
}

.tile-32 {
  background-color: #f67c5f;
}

.tile-64 {
  background-color: #f65e3b;
}

.tile-128 {
  background-color: #edcf72;
}

.tile-256 {
  background-color: #edcc61;
}

.tile-512 {
  background-color: #edc850;
}

.tile-1024 {
  background-color: #edc53f;
}

#floatingBox {
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  /* width: 300px; */
  /* height: 300px; */
  border: 2px solid #ccc;
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  background-color: #f5f5f5;

  position: absolute;
  bottom: 70px;
  left: 70px;
}

.arrow-button {
  display: block;
  width: 100px;
  height: 100px;
  border: none;
  border-radius: 10%;
  /* background-color: #4caf50; Green */
  color: white;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.1s ease-in-out;

  position: absolute;
}

.arrow-button:hover {
  /* background-color: #45a049; Darker green */
  transform: scale(1.05);
}

#up {
  line-height: 50px;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  font-size: 60px;
}

#left {
  line-height: 50px;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  font-size: 60px;
}

#right {
  line-height: 50px;
  top: 50%;
  left: 100%;
  transform: translateY(-50%) translateX(-100%);
  font-size: 60px;
}

#down {
  line-height: 50px;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-100%);
  font-size: 60px;
}

#scoreContainer {
  width: 40vw;
  display: flex;
  margin: auto;
  justify-content: space-around;
}

.scoreBoard {
  border-radius: 10px;
  border: solid 5px slategrey;
  color: dimgray;
  background-color: #0c1021;
  display: inline-block;
  padding: 1vw;
  width: 16vw;

  -webkit-box-shadow: 0px 0px 20px 3px rgba(0, 0, 0, 0.6);
  -moz-box-shadow: 0px 0px 20px 3px rgba(0, 0, 0, 0.6);
  box-shadow: 0px 0px 20px 3px rgba(0, 0, 0, 0.6);
}
#onScreenControllers {
  display: none;
}

@media only screen and (max-width: 768px) {
  /* MOBILE */
  .game-container {
    width: 80vw;
    height: 80vw;
  }

  .game-tile {
    width: 20vw;
    height: 20vw;
  }

  #scoreContainer {
    width: 80vw;
  }

  #onScreenControllers {
    width: 80vw;
    margin: 5vw auto;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
  }

  #onScreenControllers > div {
    display: flex;
    flex-direction: column;
  }

  #onScreenControllers button {
    background-color: transparent;
    height: 20vw;
    width: 20vw;
    font-size: 10vw;
    border: none;
  }

  #onScreenControllers button:focus {
    outline: none;
  }

  #onScreenControllers button:active {
    background-color: slategray;
  }
}

.nav-item a {
  text-align: left !important;
}
@media (min-width: 992px) {
  .nav-sm-fix {
    margin-bottom: 75px;
  }
}

/* 响应式字号大小 */
.game-tile {
  font-size: 48px;
}

/* 当屏幕宽度大于或等于 1200px 时，字号保持不变 */
@media (max-width: 1200px) {
  .game-tile {
    font-size: 38px;
  }
}

/* 当屏幕宽度大于或等于 992px 时，字号减小 */
@media (max-width: 992px) {
  .game-tile {
    font-size: 33px;
  }
}

/* 当屏幕宽度大于或等于 768px 时，字号进一步减小 */
@media (max-width: 768px) {
  .game-tile {
    font-size: 30px;
  }
}

/* 当屏幕宽度大于或等于 576px 时，字号进一步减小 */
@media (max-width: 576px) {
  .game-tile {
    font-size: 25px;
  }
}

/* 当屏幕宽度大于或等于 320px 时，字号进一步减小 */
@media (max-width: 320px) {
  .game-tile {
    font-size: 20px;
  }
}
